﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class three : System.Web.UI.Page
{
    protected string biaoti ;
    protected string zhengwen ;


    protected void Page_Load(object sender, EventArgs e)
    {
        using (DataClassesDataContext ds = new DataClassesDataContext())
        {
            var r1 = (from q in ds.YeWuZiLiao
                      where q.id == Convert.ToInt32(Request.QueryString["id"])
                      select new
                      {
                          biaoti = q.mingcheng == null ? "" : q.mingcheng,
                          zhengwen = q.neirong == null ? "" : q.neirong,
                          imgdir=q.imgdir==null?"":q.imgdir
                      }).FirstOrDefault();

            biaoti = r1.biaoti;
            zhengwen = r1.zhengwen;
            if (r1.imgdir != "")
            {
                //Image1.Width = 300;
                //Image1.Height = 200;
                Image1.ImageUrl = r1.imgdir;
            }
            else
            {
                Image1.Visible = false;//当没有图片显示时，连图片框的标志也不显示
            }
        }

        
    }

   
}